import request from "@/utils/request";

//品牌制造商接口
//获取行政区域数据
export function getregion(params) {
  return request({
    url: "/admin/region/list",
    method: "get",
    params,
  });
}
//获取品牌制造商数据
export function getbrand(params) {
  return request({
    url: "/admin/brand/list",
    method: "get",
    params,
  });
}

//添加品牌制造商
export function addbrand(data) {
  return request({
    url: "/admin/brand/create",
    method: "post",
    data,
  });
}

//编辑品牌制造商 /admin/brand/update
export function updatebrand(data) {
  return request({
    url: "/admin/brand/update",
    method: "post",
    data,
  });
}
//删除品牌制造商  /admin/brand/delete
export function delbrand(data) {
  return request({
    url: "/admin/brand/delete",
    method: "post",
    data,
  });
}

//  品牌类目接口
//获取商品类目数据 /admin/category/list
export function getcategory(params) {
  return request({
    url: "/admin/category/list",
    method: "get",
    params,
  });
}

// 添加类目 category/create
export function addcategory(data) {
  return request({
    url: "/admin/category/create",
    method: "post",
    data,
  });
}
//获取一级类目  /category/l1
export function getcategoryl1() {
  return request({
    url: "/admin/category/l1",
    method: "get",
  });
}

// 编辑类目 category/update
export function updatcategory(data) {
  return request({
    url: "/admin/category/update",
    method: "post",
    data,
  });
}

//删除类目  admin/category/delete
export function delcategory(data) {
  return request({
    url: "/admin/category/delete",
    method: "post",
    data,
  });
}

//获取订单数据 /order/list
export function getorder(params) {
  return request({
    url: "/admin/order/list",
    method: "get",
    params,
  });
}

// 获取订单详情数据 admin/order/detail
export function getorderdetail(params) {
  return request({
    url: "/admin/order/detail",
    method: "get",
    params,
  });
}


// 获取通用问题数据 /admin/issue/list

export function getissue(params) {
  return request({
    url: "/admin/issue/list",
    method: "get",
    params,
  });
}

//添加问题 /admin/issue/create

export function addissue(data) {
  return request({
    url: "/admin/issue/create",
    method: "post",
    data,
  });
}


//  编辑问题 admin/issue/update
export function updateissue(data) {
  return request({
    url: "/admin/issue/update",
    method: "post",
    data,
  });
}

// 删除问题 /issue/delete

export function deleteissue(data) {
  return request({
    url: "/admin/issue/delete",
    method: "post",
    data,
  });
}
